package design;

public class Singleton_05双重校验锁线程安全 {

    private static volatile Singleton_05双重校验锁线程安全 instance;

    private Singleton_05双重校验锁线程安全() {
    }

    public static Singleton_05双重校验锁线程安全 getInstance(){
       if(null != instance) return instance;
       synchronized (Singleton_05双重校验锁线程安全.class){
           if (null == instance){
               instance = new Singleton_05双重校验锁线程安全();
           }
       }
       return instance;
    }

}
